#! /bin/sh
# Miggbzo -- apply MIGration by Gaussian Beams for Zero Offset
set -x

demo=3

nt=500 dt=.004 ft=0.0 dtsegy=4000
nx=180 dx=20  fx=0.0
nz=500 dz=5  fz=0.0
#fmin=10 fmax=50    # see param2 in model.dir 

# make velocity function
cd miggbzo.dir

# create the background velocity models
Unif2

# put su headers on data
suaddhead < demo${demo}traces ns=500  ftn=1 |
sushw key=dt a=$dtsegy > junk.su

# plot background velocity model
ximage < junkv n1=500 n2=180 -geometry 560x460+0+650 \
title="Exact Background velocity " \
d1=5 d2=20 &

# Gaussian beam migration; use background velocity model2
sumiggbzo <junk.su >junkmgb vfile=junkv \
	 dt=$dt dx=$dx dz=$dz nz=$nz fz=$fz \
	fmin=$fmin fmax=$fmax

# plot output of gb migration
suximage <junkmgb  perc=99  -geometry 560x460-0-0 \
	label1="Depth" label2="Distance" \
	title="GB Mig exact background " &

exit 0
